const app = getApp()
const util = require('../../utils/util.js')
Page({
  data: {
    loading:1
  },
  onLoad: function(options) {
    let nowDate = new Date(),
      signInQr = wx.getStorageSync('signInQr'),
      personalSignInInfo = wx.getStorageSync('personalSignInInfo')

    this.setData({
      name: personalSignInInfo.name,
      account: personalSignInInfo.account == 'BBBABAAA' ? null : personalSignInInfo.account,
      meetingName: signInQr.name,
      nowDate: util.formatTime(nowDate).split(" ")[0],
      loading:0
    })
    if (options.repeat == 1) {
      wx.showModal({
        content: '您已成功提交，请勿重复签到，感谢您的使用！',
        showCancel: false,
      })
    }
  },
  formSubmit: function(option) {
    console.log("signInSuccess")
    wx.redirectTo({
      url: '/pages/indexBlank/indexBlank',
    })
    wx.removeStorage({
      key: 'signInQr'
    })
    wx.removeStorage({
      key: 'personalSignInInfo'
    })
  },

})